{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>标题</th>\n",
       "      <th>图片链接</th>\n",
       "      <th>详情页</th>\n",
       "      <th>价格</th>\n",
       "      <th>运费</th>\n",
       "      <th>所在地</th>\n",
       "      <th>销量</th>\n",
       "      <th>评论数</th>\n",
       "      <th>店铺名称</th>\n",
       "      <th>标识</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>吊干杏干500g杏脯非新疆杏肉干无红杏干添加天然酸甜果干蜜饯零食</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://detail.tmall.com/item.htm?id\\u003d6216...</td>\n",
       "      <td>13.80</td>\n",
       "      <td>100.0</td>\n",
       "      <td>浙江杭州</td>\n",
       "      <td>1万+</td>\n",
       "      <td>31849.0</td>\n",
       "      <td>每果时光旗舰店</td>\n",
       "      <td>['尚天猫，就购了', '公益宝贝']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>新疆红杏干杏脯500g无吊干杏杏肉添加天然酸杏子休闲零食果脯蜜饯</td>\n",
       "      <td>https://g-search2.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://detail.tmall.com/item.htm?id\\u003d6270...</td>\n",
       "      <td>13.80</td>\n",
       "      <td>30.0</td>\n",
       "      <td>安徽宣城</td>\n",
       "      <td>5000+</td>\n",
       "      <td>35785.0</td>\n",
       "      <td>蜜禾食品旗舰店</td>\n",
       "      <td>['尚天猫，就购了']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>新疆特产土耳其大黑杏干甜杏干杏脯无核杏肉500g包邮</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://item.taobao.com/item.htm?id\\u003d54601...</td>\n",
       "      <td>28.80</td>\n",
       "      <td>0.0</td>\n",
       "      <td>新疆乌鲁木齐</td>\n",
       "      <td>4000+</td>\n",
       "      <td>25275.0</td>\n",
       "      <td>新疆超级风味特产</td>\n",
       "      <td>['金牌卖家从千万卖家中脱颖而出，会为您的购物体验带来更多信任和安心']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>吊干杏干不添加然天新疆特产2021年新货特树上干杏脯级新疆杏干</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://item.taobao.com/item.htm?id\\u003d58059...</td>\n",
       "      <td>16.40</td>\n",
       "      <td>0.0</td>\n",
       "      <td>新疆阿克苏</td>\n",
       "      <td>4000+</td>\n",
       "      <td>43634.0</td>\n",
       "      <td>疆南味道</td>\n",
       "      <td>['金牌卖家从千万卖家中脱颖而出，会为您的购物体验带来更多信任和安心', '公益宝贝']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>新疆特产杏干无添加天然土耳其大黑杏脯无核无糖杏肉果脯零食500g</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://item.taobao.com/item.htm?id\\u003d63309...</td>\n",
       "      <td>35.00</td>\n",
       "      <td>0.0</td>\n",
       "      <td>新疆乌鲁木齐</td>\n",
       "      <td>4000+</td>\n",
       "      <td>19742.0</td>\n",
       "      <td>快乐的小吖伟</td>\n",
       "      <td>['金牌卖家从千万卖家中脱颖而出，会为您的购物体验带来更多信任和安心', '公益宝贝']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3735</th>\n",
       "      <td>新疆四团树上杏干新货零食特产500克2袋包邮</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://detail.tmall.com/item.htm?id\\u003d6581...</td>\n",
       "      <td>46.16</td>\n",
       "      <td>999.0</td>\n",
       "      <td>上海</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>米可丹旗舰店</td>\n",
       "      <td>['尚天猫，就购了', '当季新品']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3736</th>\n",
       "      <td>敦煌李广杏干320g甘肃特产皇宝杏肉葡萄干黑加仑树上吊干非新疆</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://detail.tmall.com/item.htm?id\\u003d6557...</td>\n",
       "      <td>43.20</td>\n",
       "      <td>999.0</td>\n",
       "      <td>上海</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>米可丹旗舰店</td>\n",
       "      <td>['尚天猫，就购了', '当季新品']</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3737</th>\n",
       "      <td>新疆杏包仁大漠马卡龙天然吊死杏干夹核桃仁甘草杏脯杏肉树上干杏</td>\n",
       "      <td>https://g-search3.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://item.taobao.com/item.htm?id\\u003d66314...</td>\n",
       "      <td>33.50</td>\n",
       "      <td>500.0</td>\n",
       "      <td>北京</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>珈伶食品</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3738</th>\n",
       "      <td>英吉沙杏新疆特产杏肉小小的我杏干杏子肉果干果脯蜜饯零食小吃</td>\n",
       "      <td>https://g-search2.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://item.taobao.com/item.htm?id\\u003d65387...</td>\n",
       "      <td>31.44</td>\n",
       "      <td>25.0</td>\n",
       "      <td>浙江杭州</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>tb953270663</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3739</th>\n",
       "      <td>新疆杏干一杏两吃吊干杏干无添加自然风干树上果干小白杏干500g</td>\n",
       "      <td>https://g-search1.alicdn.com/img/bao/uploaded/...</td>\n",
       "      <td>https://detail.tmall.com/item.htm?id\\u003d6114...</td>\n",
       "      <td>37.03</td>\n",
       "      <td>25.0</td>\n",
       "      <td>陕西西安</td>\n",
       "      <td>0</td>\n",
       "      <td>NaN</td>\n",
       "      <td>懒馋食旗舰店</td>\n",
       "      <td>['尚天猫，就购了']</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>3740 rows × 10 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                    标题  \\\n",
       "0     吊干杏干500g杏脯非新疆杏肉干无红杏干添加天然酸甜果干蜜饯零食   \n",
       "1     新疆红杏干杏脯500g无吊干杏杏肉添加天然酸杏子休闲零食果脯蜜饯   \n",
       "2           新疆特产土耳其大黑杏干甜杏干杏脯无核杏肉500g包邮   \n",
       "3      吊干杏干不添加然天新疆特产2021年新货特树上干杏脯级新疆杏干   \n",
       "4     新疆特产杏干无添加天然土耳其大黑杏脯无核无糖杏肉果脯零食500g   \n",
       "...                                ...   \n",
       "3735            新疆四团树上杏干新货零食特产500克2袋包邮   \n",
       "3736   敦煌李广杏干320g甘肃特产皇宝杏肉葡萄干黑加仑树上吊干非新疆   \n",
       "3737    新疆杏包仁大漠马卡龙天然吊死杏干夹核桃仁甘草杏脯杏肉树上干杏   \n",
       "3738     英吉沙杏新疆特产杏肉小小的我杏干杏子肉果干果脯蜜饯零食小吃   \n",
       "3739   新疆杏干一杏两吃吊干杏干无添加自然风干树上果干小白杏干500g   \n",
       "\n",
       "                                                   图片链接  \\\n",
       "0     https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "1     https://g-search2.alicdn.com/img/bao/uploaded/...   \n",
       "2     https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "3     https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "4     https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "...                                                 ...   \n",
       "3735  https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "3736  https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "3737  https://g-search3.alicdn.com/img/bao/uploaded/...   \n",
       "3738  https://g-search2.alicdn.com/img/bao/uploaded/...   \n",
       "3739  https://g-search1.alicdn.com/img/bao/uploaded/...   \n",
       "\n",
       "                                                    详情页     价格     运费     所在地  \\\n",
       "0     https://detail.tmall.com/item.htm?id\\u003d6216...  13.80  100.0    浙江杭州   \n",
       "1     https://detail.tmall.com/item.htm?id\\u003d6270...  13.80   30.0    安徽宣城   \n",
       "2     https://item.taobao.com/item.htm?id\\u003d54601...  28.80    0.0  新疆乌鲁木齐   \n",
       "3     https://item.taobao.com/item.htm?id\\u003d58059...  16.40    0.0   新疆阿克苏   \n",
       "4     https://item.taobao.com/item.htm?id\\u003d63309...  35.00    0.0  新疆乌鲁木齐   \n",
       "...                                                 ...    ...    ...     ...   \n",
       "3735  https://detail.tmall.com/item.htm?id\\u003d6581...  46.16  999.0      上海   \n",
       "3736  https://detail.tmall.com/item.htm?id\\u003d6557...  43.20  999.0      上海   \n",
       "3737  https://item.taobao.com/item.htm?id\\u003d66314...  33.50  500.0      北京   \n",
       "3738  https://item.taobao.com/item.htm?id\\u003d65387...  31.44   25.0    浙江杭州   \n",
       "3739  https://detail.tmall.com/item.htm?id\\u003d6114...  37.03   25.0    陕西西安   \n",
       "\n",
       "         销量      评论数         店铺名称  \\\n",
       "0       1万+  31849.0      每果时光旗舰店   \n",
       "1     5000+  35785.0      蜜禾食品旗舰店   \n",
       "2     4000+  25275.0     新疆超级风味特产   \n",
       "3     4000+  43634.0         疆南味道   \n",
       "4     4000+  19742.0       快乐的小吖伟   \n",
       "...     ...      ...          ...   \n",
       "3735      0      NaN       米可丹旗舰店   \n",
       "3736      0      NaN       米可丹旗舰店   \n",
       "3737      0      NaN         珈伶食品   \n",
       "3738      0      NaN  tb953270663   \n",
       "3739      0      NaN       懒馋食旗舰店   \n",
       "\n",
       "                                                标识  \n",
       "0                              ['尚天猫，就购了', '公益宝贝']  \n",
       "1                                      ['尚天猫，就购了']  \n",
       "2             ['金牌卖家从千万卖家中脱颖而出，会为您的购物体验带来更多信任和安心']  \n",
       "3     ['金牌卖家从千万卖家中脱颖而出，会为您的购物体验带来更多信任和安心', '公益宝贝']  \n",
       "4     ['金牌卖家从千万卖家中脱颖而出，会为您的购物体验带来更多信任和安心', '公益宝贝']  \n",
       "...                                            ...  \n",
       "3735                           ['尚天猫，就购了', '当季新品']  \n",
       "3736                           ['尚天猫，就购了', '当季新品']  \n",
       "3737                                            []  \n",
       "3738                                            []  \n",
       "3739                                   ['尚天猫，就购了']  \n",
       "\n",
       "[3740 rows x 10 columns]"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "df = pd.read_csv('./新疆杏淘宝销售1.csv')\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "C:\\Users\\kit\\AppData\\Local\\Temp/ipykernel_13536/3085400169.py:1: FutureWarning: The default value of regex will change from True to False in a future version.\n",
      "  df['销量'] = df['销量'].str.replace('万\\+','0000')\n"
     ]
    }
   ],
   "source": [
    "df['销量'] = df['销量'].str.replace('万\\+','0000')\n",
    "df['销量'] = df['销量'].str.strip('+')\n",
    "df.to_csv('淘宝_新疆杏销售数据.csv',index=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "interpreter": {
   "hash": "c3ac3f88986c03f5f4ea9b167d463bfb61b25cb597313235fabe727a0f7e0da2"
  },
  "kernelspec": {
   "display_name": "Python 3.9.5 64-bit ('base': conda)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.9.5"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
